#! /usr/bin/make -f

build-activex: stamp-activex-build

stamp-activex-fetch:
	rm -Rf activex-vlc
	git clone git://git.videolan.org/activex-vlc.git activex-vlc
	touch $@

stamp-activex-autogen: stamp-activex-fetch
# extras/package/activex.am
	cd activex-vlc && \
	$(SHELL) ./autogen.sh
	touch $@

stamp-activex-configure: stamp-activex-autogen
	cd activex-vlc && \
	$(SHELL) ./configure \
		--prefix=/ \
		--host=$(host_alias) --build=$(build_alias) \
		CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" \
		CC="$(CC)" CFLAGS="$(CFLAGS)" \
		CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \
		LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
		SHELL="$(SHELL)" \
		PKG_CONFIG_LIBDIR="../$(srcdir)/extras/contrib/lib/pkgconfig:../src"
	touch $@

stamp-activex-build: stamp-activex-configure
	cd activex-vlc && \
	$(MAKE) all && \
	$(MAKE) DESTDIR="$(abs_builddir)/activex-vlc/installed" install
	touch $@
